from celery_tasks.main import celery_app
from qiniuyun import qiniu_storage


@celery_app.task(name='send_image_code')
def send_image_code(rec_data):
    key = qiniu_storage.storage(rec_data.read())

    img_url = 'http://qa7se59td.bkt.clouddn.com/{}'.format(key)
    print(img_url)
    return img_url